From: Keir Fraser Date: Mon, 26 Oct 2009 12:20:07 +0000 (+0000) Subject: xend, passthrough: Small fix to find_all_the_multi_functions() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13174 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=8fb16359d547cd56543e2a07c233e61ebb01b550;p=xen.git xend, passthrough: Small fix to find_all_the_multi_functions() From: Stefano Stabellini Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py index 8334e3d437..e89bf3446f 100644 --- a/tools/python/xen/util/pci.py +++ b/tools/python/xen/util/pci.py @@ -830,7 +830,10 @@ class PciDevice: def find_all_the_multi_functions(self): sysfs_mnt = find_sysfs_mnt() - parent = pci_dict_to_bdf_str(self.find_parent()) + parentdict = self.find_parent() + if parentdict is None : + return [ self.name ] + parent = pci_dict_to_bdf_str(parentdict) pci_names = os.popen('ls ' + sysfs_mnt + SYSFS_PCI_DEVS_PATH + '/' + \ parent + '/').read() funcs = extract_the_exact_pci_names(pci_names)